package pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Data
@TableName("good")
public class Good {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    private String gName;
  
    private String gImage;
   
    private BigDecimal gPrice;
 
    private Long gCategoryId;

    private Boolean gStatus;

    private Integer gNumber;
    
    private String gDesciption;
   
    private Timestamp gCreateTime;

    private Timestamp gUpdateTime;

    private String gCreateUser;

    private String gUpdateUser;
    @TableLogic
    private String gDelflag;

    private Boolean gHot;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getgName() {
        return gName;
    }

    public void setgName(String gName) {
        this.gName = gName;
    }

    public String getgImage() {
        return gImage;
    }

    public void setgImage(String gImage) {
        this.gImage = gImage;
    }

    public BigDecimal getgPrice() {
        return gPrice;
    }

    public void setgPrice(BigDecimal gPrice) {
        this.gPrice = gPrice;
    }

    public Long getgCategoryId() {
        return gCategoryId;
    }

    public void setgCategoryId(Long gCategoryId) {
        this.gCategoryId = gCategoryId;
    }

    public Boolean getgStatus() {
        return gStatus;
    }

    public void setgStatus(Boolean gStatus) {
        this.gStatus = gStatus;
    }

    public Integer getgNumber() {
        return gNumber;
    }

    public void setgNumber(Integer gNumber) {
        this.gNumber = gNumber;
    }

    public String getgDesciption() {
        return gDesciption;
    }

    public void setgDesciption(String gDesciption) {
        this.gDesciption = gDesciption;
    }

    public Timestamp getgCreateTime() {
        return gCreateTime;
    }

    public void setgCreateTime(Timestamp gCreateTime) {
        this.gCreateTime = gCreateTime;
    }

    public Timestamp getgUpdateTime() {
        return gUpdateTime;
    }

    public void setgUpdateTime(Timestamp gUpdateTime) {
        this.gUpdateTime = gUpdateTime;
    }

    public String getgCreateUser() {
        return gCreateUser;
    }

    public void setgCreateUser(String gCreateUser) {
        this.gCreateUser = gCreateUser;
    }

    public String getgUpdateUser() {
        return gUpdateUser;
    }

    public void setgUpdateUser(String gUpdateUser) {
        this.gUpdateUser = gUpdateUser;
    }

    public String getgDelfalg() {
        return gDelflag;
    }

    public void setgDelfalg(String gDelfalg) {
        this.gDelflag = gDelfalg;
    }

    public Boolean getgHot() {
        return gHot;
    }

    public void setgHot(Boolean gHot) {
        this.gHot = gHot;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Good good = (Good) o;
        return id == good.id && gHot == good.gHot && Objects.equals(gName, good.gName) && Objects.equals(gImage, good.gImage) && Objects.equals(gPrice, good.gPrice) && Objects.equals(gCategoryId, good.gCategoryId) && Objects.equals(gStatus, good.gStatus) && Objects.equals(gNumber, good.gNumber) && Objects.equals(gDesciption, good.gDesciption) && Objects.equals(gCreateTime, good.gCreateTime) && Objects.equals(gUpdateTime, good.gUpdateTime) && Objects.equals(gCreateUser, good.gCreateUser) && Objects.equals(gUpdateUser, good.gUpdateUser) && Objects.equals(gDelflag, good.gDelflag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, gName, gImage, gPrice, gCategoryId, gStatus, gNumber, gDesciption, gCreateTime, gUpdateTime, gCreateUser, gUpdateUser, gDelflag, gHot);
    }
}
